package com.bdan.t382.entity;

import org.slf4j.LoggerFactory;

import org.slf4j.Logger;

import java.io.Serializable;

public class Pet implements Serializable {
    private static final Logger LOGGER= LoggerFactory.getLogger(Pet.class);
    private String name;
    private int age;

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        LOGGER.debug("Pet对象的setAge方法被调用，参数age={}",age);
        this.age = age;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Pet() {
    }

    public Pet(String name, int age) {
        this.name = name;
        this.age = age;
    }
    // 自我介绍
 public void introduce(){
         System.out.println("我是'" + this.name + "'，今年" + this.age + "岁");
         }
}
